Acceleration Code Example (C)

static void
MyFillRect(Hsun_awt_aw_DrawArea* this,
  long x, long y, long w, long h,
  int color, aw_pix_op op, void (*fallback)())
{
  /* if there's an operation in progress, wait! */
  waitUntilDone(base);

  LONG(base, foregroundColor) = color;
  LONG(base, rasterOp) = (op == AW_GR_XOR);
  LONG(base, destinationLocation) = (x<<16) | y;
  LONG(base, sourceSize) = (w<<16) | h;
  LONG(base, drawingEngineControl) = FILL_AREA;
}
       		

Return to Tracks